package com.zr.inquiry.meiju;

/**
 * Created by Administrator on 2019/10/9.
 */
public enum  isTaxEnum {
    /*
    * 是否含税
    * */

    SHI(0,"含税"),FOU(1,"不含税");

    private final String statusName;
    private final Integer statusValue;

    public String getStatusName() {
        return statusName;
    }

    public Integer getStatusValue() {
        return statusValue;
    }

    private isTaxEnum(Integer statusValue, String statusName)
    {
        this.statusName = statusName;
        this.statusValue = statusValue;
    }

    //通过Name获取Value
    public static Integer getValue(String statusName){
        for (isTaxEnum is: isTaxEnum.values()){
            if(is.getStatusName().equals(statusName)){
                return is.statusValue;
            }
        }
        return null;
    }


    //通过Value获取Name
    public static String getName(Integer statusValue){
        for (isTaxEnum is: isTaxEnum.values()){
            if(is.getStatusValue()==statusValue){
                return is.getStatusName();
            }
        }
        return null;
    }
}
